package com.example.wechat.Fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.wechat.R;

public class Fg_wd extends Fragment {
    private TextView mpayment,mCollection,malbum,mCardBag,mexpression,mSetUp;
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.activity_fg_wd,container,false);
        mpayment=view.findViewById(R.id.payment);
        mCollection=view.findViewById(R.id.Collection);
        malbum=view.findViewById(R.id.album);
        mCardBag=view.findViewById(R.id.CardBag);
        mexpression=view.findViewById(R.id.expression);
        mSetUp=view.findViewById(R.id.SetUp);
        initView();
        return view;
    }

    private void initView() {
        //支付
        mpayment.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mpayment.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //收藏
        mCollection.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mCollection.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //相册
        malbum.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+malbum.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //卡包
        mCardBag.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mCardBag.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //表情
        mexpression.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mexpression.getText(), Toast.LENGTH_SHORT).show();
            }
        });
        //设置
        mSetUp.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(view.getContext(), "你点击了"+mSetUp.getText(), Toast.LENGTH_SHORT).show();
            }
        });




    }
}
